import React from 'react'
import PropTypes from 'prop-types'
import {
  View,
  StyleSheet,
  Text
} from 'react-native'
import { ONE_PIXEL } from '@/utils/ScreenUtil'
import { ScaleS, ScaleT } from 'src/utils/ScreenUtil'
import CustomImage from 'src/components/image/CustomImage'
const arrowRight = require('@/imgC/userinfo/arrow_black_right.png')
export default class SetCell extends React.PureComponent {
  static propTypes = {
    title: PropTypes.string,
    value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
    params: PropTypes.any,
    style: PropTypes.object
  }

  render () {
    const {
      style, title, value
    } = this.props
    return (
      <View style={[styles.container, style]} >
        <Text style={styles.title}>{title}</Text>
        <Text style={styles.value}>{value}</Text>
        <CustomImage style={styles.arrowRight} source={arrowRight} />
      </View>
    )
  }
}
const styles = StyleSheet.create({
  container: {
    width: '100%',
    height: ScaleS(77),
    flexDirection: 'row',
    alignItems: 'center',
    borderColor: '#EFEFEF',
    borderStyle: 'solid',
    borderBottomWidth: ONE_PIXEL,
    paddingLeft: ScaleS(20)
  },
  title: {
    flex: 1,
    color: '#000000',
    fontSize: ScaleT(17),
    fontWeight: '400'
  },
  value: {
    fontSize: ScaleT(17),
    color: '#5DC9C5'
  },
  arrowRight: {
    marginLeft: ScaleS(20),
    marginRight: ScaleS(22),
    width: ScaleS(8),
    height: ScaleS(13)
  }
})
